package com.shop2cn.iapi.agentproducts.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.agentproducts.parameter.UpdateShareTypeBean;
import com.shop2cn.iapi.agentproducts.service.UpdateShareTypeCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.utils.AgentUsers;

/**
 * 修改商户分享类型（总线回调） FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_UpdateShareType {
	private static UpdateShareTypeBean updatesharetypeBean;
	private static UpdateShareTypeCall updatesharetypeCall;
	// 渠道商
	private static int sellerId = AgentUsers.rootUserId;
	private static String sellerName = "NickautoTest";

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("修改商户分享类型（总线回调）");
	}

	@Before
	public void caseUp() {
		updatesharetypeBean = new UpdateShareTypeBean();
		updatesharetypeCall = new UpdateShareTypeCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(updatesharetypeCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_UpdateShareType_01() {
		Logger.start(true, "修改商户分享类型，小程序");
		try {
			updatesharetypeBean.setUserId(sellerId);
			updatesharetypeBean.setMchShareType(1);
			updatesharetypeCall.setData(updatesharetypeBean);
			updatesharetypeCall.callService();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_UpdateShareType_02() {
		Logger.start(true, "修改商户分享类型，H5");
		try {
			// TODO 补全case代码
			org.junit.Assert.fail();
			updatesharetypeCall.setData(updatesharetypeBean);
			updatesharetypeCall.callService();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}